﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Imaginecup.util
{
    public class DelayUtil
    {
        private double m_CurrentTime;
        private double m_DelayTime;


        public DelayUtil(double delayTime)
        {
            m_DelayTime = delayTime;
            m_CurrentTime = 0;
        }

        public bool IsProperTime(GameTime gameTime)
        {
            m_CurrentTime += gameTime.ElapsedGameTime.TotalSeconds;


            if( m_CurrentTime > m_DelayTime )
            {
                m_CurrentTime -= m_DelayTime;
                return true;
            }
            return false;
        }

    }
}
